<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- <link rel="stylesheet" href="/res/front/css/sytle/jquery-ui-css/jquery-ui.css" />
<script type="text/javascript" src="/res/front/js/js/jquery-1.5.1.js"></script>
<script type="text/javascript" src="/res/front/js/js/jquery-ui-1.8.11.js"></script>
<link type="text/css" rel="stylesheet" href="/res/front/css/sytle/user-css/user_message.css" /> -->
<link type="text/css" rel="stylesheet" href="/res/front/css/sytle/user-css/user_message.css" />
        <script type="text/javascript" src="/res/front/js/js/jquery-ui-js/jquery-1.8.3.js"></script>
		<script type="text/javascript" src="/res/front/js/js/jquery-ui-js/jquery-ui-1.9.2.custom.js"></script>
        <link rel="stylesheet" href="/res/front/css/sytle/jquery-ui-css/jquery-ui-main.css" />
<script type="text/javascript" src="/res/front/js/js/jquery.validate.js"></script>
<#include "/front/head.html"/>
<script type="text/javascript" >
	function modifypwd(){
		$.post(
			'${base}/member/pwdSubmit.jspx',
			$('#moditypwd').serialize(),
			function(msg){
					if($.trim(msg)=="true"){
						alert("修改成功,请重新登录.");
						history.go(0);	
					}else{
						alert(msg);
					}
				$("#moditypwd input").val('');
			}
		)
	}
	
	function modifytpwd(){
		$.post(
			'${base}/member/o_tmemberSubmitModifyTPwd.jspx',
			$('#moditytpwd').serialize(),
			function(msg){
				if($.trim(msg)=="true"){
					alert("修改成功.");
					history.go(0);	
				}else{
					alert(msg);
				}
				$("#moditytpwd input").val('');
			}
		)
	}
	
	$(function() {
		$( "#dialog_pwd" ).dialog({
			autoOpen: false,
			modal: true,
			show: "blind",
			hide: "explode",
			width: 700,
			height: 380,
			buttons : {
		    "提交" : function (){
		    	if($("#password").val()!=$("#newpwdconfirm").val()){
		    		alert("两次输入的新密码不一样");
		    		return;
		    	}
		    	modifypwd();
				},
			"关闭" : function (){
				$("#dialog_pwd").dialog ("close");
			}}
		});
		$( "#open_pwd" ).click(function() {
			$( "#dialog_pwd" ).dialog( "open" );
			return false;
		});
		
		
		$( "#dialog_withdraw" ).dialog({
			autoOpen: false,
			modal: true,
			show: "blind",
			hide: "explode",
			width: 700,
			height: 380,
			buttons : {
		    "提交" : function (){
		    	if($("#newtpwd").val()!=$("#newtpwdconfirm").val()){
		    		alert("两次输入的新提现密码不一样");
		    		return;
		    	}
		    	modifytpwd();
				},
			"关闭" : function (){
				$("#dialog_withdraw").dialog ("close");
			}}
		});
		$( "#open_withdraw" ).click(function() {
			$( "#dialog_withdraw" ).dialog( "open" );
			return false;
		});
	});		
</script>
<title>安全信息 - ${title}</title>
</head>

<body>
	<!-- 头部 header.html -->
	<#include "/front/common/header.html"/>
    <!-- 中部 -->
    <div class="memeber_middle">
    	<div class="member_location_div">
            <span>
                <b><a href="/index.jspx">首页</a></b>&nbsp;>
                <b>账户管理</b>&nbsp;>
                <b>安全设置</b>
            </span>
        </div>
    	<div class="memeber_centre">
            <!-- 左边目录 -->
            <div class="memeber_left_nav_div">
            	<#include "会员中心页_导航.html"/>
            </div>
            <!-- 右边目录明细 -->
            <div class="member_right_detail_div">
            	<div class="safety_div">
                	<div class="safety_title_header"><b>安全设置</b></div>
                    <div class="safety_install">
                    	<!-- 实名验证 -->
                        <div class="safety_li_tab">
                            <ul>
                                <li class="safety_userbg"></li>
                                <li class="safety_li_text1">实名认证</li>
                                <li class="safety_li_text2">${tmember.idcard!}</li>
                                <li class="safety_li_text3">${tmember.truename!}</li>
                                <li style="clear:both;"></li>
                            </ul>
                        </div>
                        <!-- 修改登录密码 -->
                        <div class="safety_li_tab">
                            <ul>
                                <li class="safety_passbg"></li>
                                <li class="safety_li_text1">登录密码</li>
                                <li class="safety_li_text2">已设置</li>
                                <li class="safety_li_text3"><a href="" id="open_pwd">修改</a></li>
                                <li style="clear:both;"></li>
                            </ul>
                        </div>
                        <!-- 修改登录密码dialog -->
                        <div class="safety_li_form" id="dialog_pwd" title="修改登录密码">
                            <div class="safetyli_1">为了您的账户安全，请定期更换登录密码，并确保登录密码与提现密码不同。</div><br />
                            <div style="width:600px;">
                                <form action="${base}/member/pwdSubmit.jspx" method="post" id="moditypwd">
                                    <div class="safetyli_2">
                                        <span style="margin-right:10px;">
                                            <span style="color:#FF0000;">*</span>
                                            原密码：
                                        </span>
                                        <input type="password" id="" name="pwd" maxlength="50"/>
                                        <span>请输入原登录密码</span>
                                    </div>
                                    <div class="safetyli_3">
                                        <span style="margin-right:10px;">
                                            <span style="color:#FF0000;">*</span>
                                            新密码：
                                        </span>
                                        <input type="password" id="password" name="newpwd" maxlength="50"/>
                                        <span>请输入6-12位字母或数字</span>
                                    </div>
                                    <div class="safetyli_4">
                                        <span style="margin-right:10px;">
                                            <span style="color:#FF0000;">*</span>
                                            确认新密码：
                                        </span>
                                        <input type="password" id="newpwdconfirm" name="newpwdconfirm" maxlength="50"/>
                                         <span>请再次输入新密码</span>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <!-- 提现密码 -->
                        <div class="safety_li_tab">
                            <ul>
                                <li class="safety_withdrawbg"></li>
                                <li class="safety_li_text1">提现密码</li>
                                <#if tmember.withdrawpassword??>
                                    <li class="safety_li_text2">已设置</li>
                                <#else>
                                    <li id="wrmsg" class="safety_li_text2">未设置</li>
                                </#if>
                                <li class="safety_li_text3"><a href="" id="open_withdraw">修改</a></li>
                            </ul>
                        </div>
                        <!-- 提现密码dialog -->
                        <div class="safety_li_form" id="dialog_withdraw" title="修改提现密码">
                            <div class="safetyli_1">为了您的账户安全，请定期更换提现密码，并确保与登录密码不同。</div><br />
                            <div class="safetyli_1">新注册用户可不填写原提现密码</div><br />
                            <div style="width:600px;">
                                <form action="" method="post" id="moditytpwd">
                                    <div class="safetyli_6">
                                        <span style="margin-right:10px;">
                                            <span style="color:#FF0000;">*</span>
                                            原提现密码：
                                        </span>
                                        <input type="password" id="" name="tpwd" class="" maxlength="50"/>
                                    </div>
                                    <div class="safetyli_6">
                                        <span style="margin-right:10px;">
                                            <span style="color:#FF0000;">*</span>
                                            新提现密码：
                                        </span>
                                        <input type="password" id="newtpwd" name="newtpwd" class="" maxlength="50"/>
                                    </div>
                                    <div class="safetyli_8">
                                        <span style="margin-right:10px;">
                                            <span style="color:#FF0000;">*</span>
                                            确认提现密码：
                                        </span>
                                        <input type="password" id="newtpwdconfirm" name="newtpwdconfirm" class="" maxlength="50"/>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <!-- 验证邮箱 -->
                        <div class="safety_li_tab">
                            <ul>
                                <li class="safety_emailbg"></li>
                                <li class="safety_li_text1">验证邮箱</li>
                                <#if tmember.emailstatus==1!>
                                    <li class="safety_li_text2">已验证</li>
                                <#else>
                                    <li id="wrmsg" class="safety_li_text2">未验证</li>
                                    <li class="safety_li_text3"><a href="/o_sendverify.jspx" id="open_withdraw">验证</a></li>
                                </#if>
                            </ul>
                        </div>
                    </div>
                    <div style="clear:both;"></div>
                </div>
                <div style="clear:both;"></div>
            </div>
            <div style="clear:both;"></div>
        </div>
    </div>
    <!-- 底部 -->
    <#include "/front/common/footer.html"/>
</body>
</html>
